 /**
 * Description: 数据字典vo
 * Copyright:Copyright 2018 nfky.com. All rights reserved
 * @author:xk
 * @since:0.0.1
 * Create at:2018-01-17 上午 11:21:47
 *  
 * Modification History:
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2018-01-17   xk       0.0.1     Initial
 */
package com.metro.activation.sys.beans.vo;

import com.metro.utils.StringUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.metro.activation.sys.beans.entity.SysDictionaryEntity;

 /**
 * 数据字典vo<br>
 *
 * @author xk
 * @since [0.0.1]
 * @version [0.0.1, 2018-01-17]
 */
@Data()
@EqualsAndHashCode(callSuper = false)
public class SysDictionary extends SysDictionaryEntity{

    public String getNameAndCode(){
        return this.getName().concat("[").concat(this.getCode()).concat("]");
    }

    public String getRootInnerCode(){
        if(StringUtil.isNotEmpty(this.getInnerCode())){
            return this.getInnerCode().substring(0,2);
        }

        return null;
    }
}
